package org.mech.sefer.client.mvp.spring;

import javax.annotation.PostConstruct;
import javax.annotation.PreDestroy;
import javax.annotation.Resource;

import org.mech.sefer.client.mvp.AbstractPresenter;
import org.mech.sefer.client.mvp.View;
import org.mech.sefer.event.bus.EventBus;

/**
 * <p>
 * The AbstractSpringPresenter that is common point for spring defined
 * presenters
 * </p>
 * <p>
 * Date: 24.4.2012 12:33:46
 * </p>
 * 
 * @param <V>
 *            the value type
 * @author martin.krajc
 */
public abstract class AbstractSpringPresenter<V extends View> extends
		AbstractPresenter<V> {

	public AbstractSpringPresenter() {
		super();
	}

	@PostConstruct
	public void postConstruct() {
		bind();
	}

	@PreDestroy
	public void preDestroy() {
		unbind();
	}

	@Override
	@Resource(name = "eventBus")
	public void setEventBus(EventBus eventBus) {
		super.setEventBus(eventBus);
	}

}
